package cn.itcast.pattern.decorator;

import cn.itcast.pattern.decorator.impl.FriceRice;
import cn.itcast.pattern.decorator.peizhi.Egg;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import sun.text.normalizer.CharTrie;

public class Client {

    public static void main(String[] args) {
        //点一份炒饭
        FastFood food = new FriceRice();
        System.out.println(food.getDesc()+" "+ food.cost());
        System.out.println("------------------------------------------------");
        //点一份蛋炒饭
        Egg food1 = new Egg(food);
        System.out.println(food1.getDesc()+" " +food1.cost());


        System.out.println("再加一个鸡蛋");
        food =new Egg(food1);
        System.out.println(food.getDesc() + food.cost() ) ;




    }
}
